home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sph_quik.lha / quickdraw / src / line_calls.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-09  |  1.2 KB  |  67 lines

  1. /*------------------------------- line_calls.c -------------------------------*/
  2. /* Copyright 1989 Brown University -- Jeffrey Vogel                           */
  3. /*----------------------------------------------------------------------------*/
  4.  
  5.  
  6. /*--------------------------------- Includes ---------------------------------*/
  7. /*----------------------------------------------------------------------------*/
  8.  
  9. #include "qd_local.h"
  10.  
  11.  
  12.  
  13. /*---------------------------------- MoveTo ----------------------------------*/
  14. /*----------------------------------------------------------------------------*/
  15.  
  16. void
  17. MoveTo(x, y)
  18. int  x, y;
  19. {
  20.    /*** error check ***/
  21.    if (!QDrunning) {
  22.       QDerror("ERROR MoveTo: QuickDraw not initialized.");
  23.       return;
  24.    }
  25.  
  26.    QDx = x;
  27.    QDy = y;
  28. }
  29.  
  30.  
  31. /*---------------------------------- LineTo ----------------------------------*/
  32. /*----------------------------------------------------------------------------*/
  33.  
  34. void
  35. LineTo(x, y)
  36. int  x, y;
  37. {
  38.    /*** error check ***/
  39.    if (!QDrunning) {
  40.       QDerror("ERROR LineTo: QuickDraw not initialized.");
  41.       return;
  42.    }
  43.  
  44.    XDrawLine(QDdisplay, QDwindow, QDgc,
  45.                   QDx, QDy, x, y);
  46.    XFlush(QDdisplay);
  47.    QDx = x;
  48.    QDy = y;
  49. }
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.